/*
 * Copyright (c) 2002-2003 by OpenSymphony
 * All rights reserved.
 */
package org.jackysoft.util;

import org.jackysoft.entity.WorkflowRunner;

/**
 * @author Hani Suleiman (hani@formicary.net) Date: Aug 29, 2003 Time: 5:14:56
 *         PM
 */
public class WorkflowStateUtil {
	// ~ Methods
	// ////////////////////////////////////////////////////////////////

	public static int[] getPossibleStates(int state) {
		switch (state) {
		case WorkflowRunner.CREATED:
			return new int[] { WorkflowRunner.ACTIVATED };

		case WorkflowRunner.ACTIVATED:
			return new int[] { WorkflowRunner.SUSPENDED, WorkflowRunner.KILLED };

		case WorkflowRunner.SUSPENDED:
			return new int[] { WorkflowRunner.ACTIVATED, WorkflowRunner.KILLED };

		default:
			return new int[0];
		}
	}
}
